package id.co.rho.scoring.cid.server.dao;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * Simplification over JPA API
 * User: bungrudi
 * Date: 8/17/11
 * Time: 8:56 AM
 */
public interface GenericDao {
    public <T> List<T> getList(String query, boolean isNamedQuery, Map parameters);
    public <T> T find(Class<T> entityType, Serializable id);
    public <T> T saveOrUpdate(T instance);
    public void remove(Object instance);
    public <T> T merge(T t);
    public void persist(Object o);
    public int executeUpdate(String query, Map parameters);
}
